home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / AUTOCK3.PAK / CLIKPNT.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  83 lines

  1. // ClikPnt.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #include "stdafx.h"
  14. #include "AutoClik.h"
  15. #include "ClikPnt.h"
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CAutoClickPoint
  24.  
  25. IMPLEMENT_DYNCREATE(CAutoClickPoint, CCmdTarget)
  26.  
  27. CAutoClickPoint::CAutoClickPoint()
  28. {
  29.     EnableAutomation();
  30.  
  31.     // To keep the application running as long as an OLE automation
  32.     //  object is active, the constructor calls AfxOleLockApp.
  33.  
  34.     AfxOleLockApp();
  35. }
  36.  
  37. CAutoClickPoint::~CAutoClickPoint()
  38. {
  39.     // To terminate the application when all objects created with
  40.     //  with OLE automation, the destructor calls AfxOleUnlockApp.
  41.  
  42.     AfxOleUnlockApp();
  43. }
  44.  
  45. void CAutoClickPoint::OnFinalRelease()
  46. {
  47.     // When the last reference for an automation object is released
  48.     //    OnFinalRelease is called.  This implementation deletes the 
  49.     //    object.  Add additional cleanup required for your object before
  50.     //    deleting it from memory.
  51.  
  52.     delete this;
  53. }
  54.  
  55.  
  56. BEGIN_MESSAGE_MAP(CAutoClickPoint, CCmdTarget)
  57.     //{{AFX_MSG_MAP(CAutoClickPoint)
  58.         // NOTE - the ClassWizard will add and remove mapping macros here.
  59.     //}}AFX_MSG_MAP
  60. END_MESSAGE_MAP()
  61.  
  62. BEGIN_DISPATCH_MAP(CAutoClickPoint, CCmdTarget)
  63.     //{{AFX_DISPATCH_MAP(CAutoClickPoint)
  64.     DISP_PROPERTY(CAutoClickPoint, "x", m_x, VT_I2)
  65.     DISP_PROPERTY(CAutoClickPoint, "y", m_y, VT_I2)
  66.     //}}AFX_DISPATCH_MAP
  67. END_DISPATCH_MAP()
  68.  
  69. // Note: we add support for IID_IAutoClickPoint to support typesafe binding
  70. //  from VBA.  This IID must match the GUID that is attached to the 
  71. //  dispinterface in the .ODL file.
  72.  
  73. // {0368D830-A050-11CE-B0F3-00AA006C28B3}
  74. static const IID IID_IAutoClickPoint =
  75. { 0x368d830, 0xa050, 0x11ce, { 0xb0, 0xf3, 0x0, 0xaa, 0x0, 0x6c, 0x28, 0xb3 } };
  76.  
  77. BEGIN_INTERFACE_MAP(CAutoClickPoint, CCmdTarget)
  78.     INTERFACE_PART(CAutoClickPoint, IID_IAutoClickPoint, Dispatch)
  79. END_INTERFACE_MAP()
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CAutoClickPoint message handlers
  83.